package com.common.models;

import java.util.HashMap;
import java.util.Map;

/**
 * 財務类型
 * @author 
 *
 */
public enum FinanceTypeEnum {
	
	INCOME("income", "收入"),//收入
	OUTGOING("outgoing", "支出"),//支出
	
	;
	private String code;
	private String key;

	private FinanceTypeEnum(String code, String key) {
		this.code = code;
		this.key = key;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getKey() {
		return key;
	}

	public void setKey(String key) {
		this.key = key;
	}

	public static Map<String, FinanceTypeEnum> getViewMap() {
		Map<String, FinanceTypeEnum> ope = new HashMap<String, FinanceTypeEnum>();
		for (FinanceTypeEnum ste :FinanceTypeEnum.values()) {
			ope.put(ste.getCode(), ste);
		}
		return ope;
	}
}
